//
//  KeFuTools.m
//  project
//
//  Created by Apple on 2017/11/12.
//  Copyright © 2017年 Macmini. All rights reserved.
//

#import "KeFuTools.h"

@implementation KeFuTools
+ (void)jumpToKeFu:(id)vc {
    //客服
    RCDCustomerServiceViewController *chatService = [[RCDCustomerServiceViewController alloc] init];
    //客服的ID...
#define SERVICE_ID @"KEFU148376554892246"
    chatService.conversationType = ConversationType_CUSTOMERSERVICE;
    chatService.targetId = SERVICE_ID;
    chatService.title = @"客服";
    //上传用户信息，nickname是必须要填写的
    RCCustomerServiceInfo *csInfo = [[RCCustomerServiceInfo alloc] init];
    csInfo.userId = [RCIMClient sharedRCIMClient].currentUserInfo.userId;
    csInfo.nickName = @"昵称";
    csInfo.loginName = @"登录名称";
    csInfo.name = @"用户名称";
    csInfo.grade = @"11级";
    csInfo.gender = @"男";
    csInfo.birthday = @"2016.5.1";
    csInfo.age = @"36";
    csInfo.profession = @"software engineer";
    csInfo.portraitUrl =
    [RCIMClient sharedRCIMClient].currentUserInfo.portraitUri;
    csInfo.province = @"beijing";
    csInfo.city = @"beijing";
    csInfo.memo = @"这是一个好顾客!";
    
    csInfo.mobileNo = @"13800000000";
    csInfo.email = @"test@example.com";
    csInfo.address = @"北京市北苑路北泰岳大厦";
    csInfo.QQ = @"88888888";
    csInfo.weibo = @"my weibo account";
    csInfo.weixin = @"myweixin";
    
    csInfo.page = @"卖化妆品的页面来的";
    csInfo.referrer = @"客户端";
    csInfo.enterUrl = @"testurl";
    csInfo.skillId = @"技能组";
    csInfo.listUrl = @[@"用户浏览的第一个商品Url",
                       @"用户浏览的第二个商品Url"];
    csInfo.define = @"自定义信息";
    
    chatService.csInfo = csInfo;
    chatService.title = @"客服";
    chatService.hidesBottomBarWhenPushed = YES;
    [((UIViewController *)vc).navigationController pushViewController:chatService animated:YES];
    
    
    
}
-(void)rightBarButtonItemPressed:(id)sender
{
    //    RCConversationViewController *conversationVC = [[RCConversationViewController alloc]init];
    //    conversationVC.conversationType =ConversationType_PRIVATE;
    //    conversationVC.targetId = @"1"; //这里模拟自己给自己发消息，您可以替换成其他登录的用户的UserId
    //    conversationVC.userName = @"测试1";
    //    conversationVC.title = @"自问自答";
    //    [self.navigationController pushViewController:conversationVC animated:YES];
    
 
    
}
@end
